package jnpf.message;

import jnpf.message.entity.UserDeviceEntity;
import jnpf.message.fallback.UserDeviceApiFallback;
import jnpf.utils.FeignName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 调用发送配置Api
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * @date 2021-03-24
 */
@FeignClient(name = FeignName.MESSAGE_SERVER_NAME, fallback = UserDeviceApiFallback.class,path = "/UserDevice")
public interface UserDeviceApi {


    /**
     * 通过Id获取用户信息
     *
     * @param id 主键值
     * @return
     */
    @GetMapping("/getInfoByClientId/{id}")
    UserDeviceEntity getInfoByClientId(@RequestParam("id") String id);

    @PostMapping("/update/{id}")
    Boolean update(@RequestParam("id") String id, @RequestBody UserDeviceEntity userDeviceEntity);


    @PostMapping("/create")
    Boolean create(@RequestBody UserDeviceEntity userDeviceEntity);

    @PostMapping("/delete")
    void delete(@RequestBody UserDeviceEntity userDeviceEntity);
}
